package com.design.model;

/**
 * def
 *
 * @author lw
 * @date 2023/12/4 15:01
 **/
public class ProxyImage implements Image{

    private RealImage realImage;
    private String filename;

    public ProxyImage(String filename) {
        this.filename = filename;
    }

    public void display() {
        if (realImage == null) {
            realImage = new RealImage(filename);
        }
        realImage.display();
    }
}
